const common = require('./base/common');
const SequentialArray = require('./dataStruct/sequentialArray').SequentialArray;

/**
 * 206. 反转链表
 * 
 * @param {ListNode} head
 * @return {ListNode}
 */
var reverseList = function(head) {
    return head.reverse();
};

common.testing([
    new SequentialArray([1, 2, 3, 4, 5]).transfer2LinkedList(),
    new SequentialArray(["do", "re", "mi", "fa", "sol", "la", "si"]).transfer2LinkedList()
])(x => reverseList(x))